﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Template.Master" Inherits="System.Web.Mvc.ViewPage<JLL.China.Model.Listings>" %>


<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div id="page-heading">
        <a class="icons icon-circle-arrow-right"></a><b><span class="show-listing">
        <%=ViewData["HeadingMsgStep3"].ToString()%>
         </span></b>
    </div>
    <div class="menu-nav">
        <% Html.RenderPartial("TopMenu");%>
    </div>
    <!-- end page-heading -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="<%=Url.Content("~/Content/images/shared/side_shadowleft.jpg")%>" width="20"
                    height="300" alt="" />
            </th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;
            </td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="<%=Url.Content("~/Content/images/shared/side_shadowright.jpg")%>" width="20"
                    height="300" alt="" />
            </th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td class="content-table-inner">
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <!--  start message-blue -->
                    <% Html.RenderPartial("Measage");%>
                    <!--  end message-blue -->
                    <!--  start step-holder -->
                    <%Html.RenderPartial("StepHolder", (ViewData["ListingID"] != null) ? ViewData["ListingID"].ToString() : null); %>
                    <!--  end step-holder -->
                    <form id="mainform" action="<%=Url.Content("~/")+ViewData["now_controller"].ToString()%>Step3/<%=ViewData["ListingID"]%>" class="list_item_form" method="post">
                    <input type="hidden" name="ListingId" value="<%=ViewData["ListingID"]%>" />
                    <table border="0" cellpadding="0" cellspacing="0" class="tbl-form" style="width: 100%;">
                        <tr class="">
                          
                            <td>
                            <p style="line-height:28px;"><b>Features</b></p>
                                <div class="scrollbox" style="max-width:488px">
                                    <%    
                                        if (this.Model != null)
                                        {
                                            if (this.Model.Features != null)
                                            {
                                                char[] delimiters = new char[] { ',' };
                                                string resultf = "'";
                                                string[] feature = this.Model.Features.Split(delimiters);
                                                for (int i = 0; i < feature.Length; i++)
                                                {
                                                    resultf += feature[i] + "','";
                                                }
                                                resultf = resultf.Substring(0, resultf.Length - 2);
                                                Html.RenderPartial("Features", resultf);
                                            }
                                            else
                                            {
                                                Html.RenderPartial("Features", "");
                                            }

                                        }
                                        else
                                        {
                                            Html.RenderPartial("Features", "");
                                        }
                                    
                                    %>
                                </div>
                                <br />
                                <a class="icons icon-check"></a><a class="check" onclick="$(this).parent().find(':checkbox').attr('checked', true);">
                                    Select All</a> <a class="icons icon-share"></a><a class="check" onclick="$(this).parent().find(':checkbox').attr('checked', false);">
                                        Unselect All</a>
                            </td>
                          
                            <td> 
                                <p style="line-height:28px;"><b>Facilities</b><br /></p>
                                <div class="scrollbox" style="max-width:488px">
                                    <%    
                                        if (this.Model != null)
                                        {
                                            if (this.Model.Facilities != null)
                                            {
                                                char[] delimiters = new char[] { ',' };
                                                string resultf = "'";
                                                string[] feature = this.Model.Facilities.Split(delimiters);
                                                for (int i = 0; i < feature.Length; i++)
                                                {
                                                    resultf += feature[i] + "','";
                                                }
                                                resultf = resultf.Substring(0, resultf.Length - 2);
                                                Html.RenderPartial("Facilities", resultf);
                                            }
                                            else
                                            {
                                                Html.RenderPartial("Facilities", "");
                                            }


                                        }
                                        else
                                        {
                                            Html.RenderPartial("Facilities", "");
                                        }    
                                    %>
                                </div>
                                <br />
                                <a class="icons icon-check"></a><a class="check " onclick="$(this).parent().find(':checkbox').attr('checked', true);">
                                    Select All</a> <a class="icons icon-share"></a><a class="check" onclick="$(this).parent().find(':checkbox').attr('checked', false);">
                                        Unselect All</a>
                            </td>
                        </tr>
                        <tr>
            <td colspan=2>
             <input type="button" style="margin-right:0px;" value="Next"    class="buttons" onclick="javascript:window.location.href='<%=Url.Content("~/")%><%=ViewData["now_controller"]%>Step4/<%= ViewData["ListingID"].ToString()%>'" />
          
                
                       <input type="submit" value="Save and proceed to Step 4" class="buttons" style="margin-right:8px;"  />
                   
            </td>
            </tr>
                    </table>
                    </form>
                </div>
                <!--  end table-content  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;
            </td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CSS" runat="server">
    <link href="<%=Url.Content("~/Scripts/qtip2/jquery.qtip.min.css") %>" rel="stylesheet"
        type="text/css" />
    <link href="<%=Url.Content("~/Content/css/mod-listing.css") %>" rel="stylesheet"
        type="text/css" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="JS" runat="server">

    <script src="<%=Url.Content("~/Scripts/knockout/knockout.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/knockout/knockout.mapping.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/qtip2/jquery.qtip.min.js")%>" type="text/javascript"></script>

</asp:Content>
